package com.ruoyi.business.service;

import com.ruoyi.common.core.domain.entity.WsdRechargeRefund;
import com.ruoyi.common.core.domain.vo.RechargeRefundVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * 充值退款配置Service接口
 *
 * @author ruoyi
 * @date 2024-05-21
 */
public interface IWsdRechargeRefundService
{
    /**
     * 查询充值退款配置
     *
     * @param configId 充值退款配置主键
     * @return 充值退款配置
     */
    public WsdRechargeRefund selectWsdRechargeRefundByConfigId(Long configId);

    /**
     * 查询充值退款配置列表
     *
     * @param wsdRechargeRefund 充值退款配置
     * @return 充值退款配置集合
     */
    public List<WsdRechargeRefund> selectWsdRechargeRefundList(WsdRechargeRefund wsdRechargeRefund);

    /**
     * 新增充值退款配置
     *
     * @param wsdRechargeRefund 充值退款配置
     * @return 结果
     */
    public int insertWsdRechargeRefund(WsdRechargeRefund wsdRechargeRefund);

    /**
     * 修改充值退款配置
     *
     * @param wsdRechargeRefund 充值退款配置
     * @return 结果
     */
    public int updateWsdRechargeRefund(WsdRechargeRefund wsdRechargeRefund);

    /**
     * 批量删除充值退款配置
     *
     * @param configIds 需要删除的充值退款配置主键集合
     * @return 结果
     */
    public int deleteWsdRechargeRefundByConfigIds(Long[] configIds);

    /**
     * 删除充值退款配置信息
     *
     * @param configId 充值退款配置主键
     * @return 结果
     */
    public int deleteWsdRechargeRefundByConfigId(Long configId);

    RechargeRefundVO existsActiveSemester(Long schoolId, String formattedDate);

    RechargeRefundVO existsActive(Long schoolId, String end, String start);

    /**
     * 计算退费金额
     *
     * @param breakfast
     * @param lunch
     * @param dinner
     * @param schoolId
     * @return
     */
    BigDecimal calculateTotalRefund(Boolean breakfast, Boolean lunch, Boolean dinner, Long schoolId,RechargeRefundVO rechargeRefundVO);
    BigDecimal calculateTotalRefund2(Boolean breakfast, Boolean lunch, Boolean dinner, Long schoolId,WsdRechargeRefund rechargeRefundVO);
}
